Skip to content

Conversation

@ironAiken2
Copy link
Contributor

@ironAiken2 ironAiken2 commented Oct 23, 2025

Resolves #4442 (FR-1597)

Summary

This PR fixes a bug in the KeypairResourcePolicySettingModal component where the 'name' field was being incorrectly passed in the props object when updating keypair resource policies.

Changes

  • Added 'name' to the _.omit() function to exclude it from the props object in the handleOk method
  • This prevents the 'name' field from being included in the modification payload sent to the API

Why this fix is needed

The 'name' field should not be included in the modification payload when updating keypair resource policies, as it's not a modifiable field and causes issues with the API.

Testing

  • Verify that creating/modifying keypair resource policies works correctly
  • Ensure the 'name' field is not included in the API payload
  • Confirm no regression in existing functionality

Copy link
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added the size:XS ~10 LoC label Oct 23, 2025
@ironAiken2 ironAiken2 marked this pull request as ready for review October 23, 2025 08:36
@Copilot Copilot AI review requested due to automatic review settings October 23, 2025 08:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug where the 'name' field was incorrectly included in the API payload when updating keypair resource policies, causing API errors since 'name' is not a modifiable field.

Key Change:

  • Modified the _.omit() function call in the handleOk method to exclude the 'name' field along with 'parsedTotalResourceSlots' from the props object sent to the API

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link

github-actions bot commented Oct 23, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 4.65% 532/11432
🔴 Branches 3.76% 302/8030
🔴 Functions 2.88% 102/3544
🔴 Lines 4.6% 514/11172

Test suite run success

121 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from 4f4ca4f

Copy link
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@graphite-app
Copy link

graphite-app bot commented Oct 27, 2025

Merge activity

…al props (#4443)

Resolves #4442 ([FR-1597](https://lablup.atlassian.net/browse/FR-1597))

## Summary
This PR fixes a bug in the KeypairResourcePolicySettingModal component where the 'name' field was being incorrectly passed in the props object when updating keypair resource policies.

## Changes
- Added 'name' to the `_.omit()` function to exclude it from the props object in the `handleOk` method
- This prevents the 'name' field from being included in the modification payload sent to the API

## Why this fix is needed
The 'name' field should not be included in the modification payload when updating keypair resource policies, as it's not a modifiable field and causes issues with the API.

## Testing
- Verify that creating/modifying keypair resource policies works correctly
- Ensure the 'name' field is not included in the API payload
- Confirm no regression in existing functionality

[FR-1597]: https://lablup.atlassian.net/browse/FR-1597?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@graphite-app graphite-app bot force-pushed the fix/FR-1597-keypair-policy-name-field branch from 6a830b2 to 4f4ca4f Compare October 27, 2025 02:35
@graphite-app graphite-app bot merged commit 4f4ca4f into main Oct 27, 2025
10 checks passed
@graphite-app graphite-app bot deleted the fix/FR-1597-keypair-policy-name-field branch October 27, 2025 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS ~10 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix name field exclusion in KeypairResourcePolicySettingModal props

2 participants